import request from './request';
// 添加账号
export function userAdd(query) {
    return request({
        url: 'user/add',
        method: 'post',
        data: query,
    })
}
// 账号列表
export function userList(query) {
    return request({
        url: 'user/list',
        method: 'post',
        data: query,
    })
}
// 修改密码
export function userChangePwd(query) {
    return request({
        url: 'user/changePwd',
        method: 'post',
        data: query,
    })
}

//修改自己的密码
export function userChangeMePassword(query) {
    return request({
        url: 'user/changeMePassword',
        method: 'post',
        data: query,
    })
}

// 修改账号，可修改绑定员工
export function userEdit(query) {
    return request({
        url: 'user/edit',
        method: 'post',
        data: query,
    })
}
// 删除账号
export function userRemove(query) {
    return request({
        url: 'user/remove',
        method: 'post',
        data: query,
    })
}

//菜单列表
export function menuList(query) {
    return request({
        url: 'menu/list',
        method: 'post',
        data: query,
    })
}

//新增菜单
export function menuAdd(query) {
    return request({
        url: 'menu/add',
        method: 'post',
        data: query,
    })
}
//删除菜单
export function menuDel(query) {
    return request({
        url: 'menu/delete',
        method: 'post',
        data: query,
        headers: {
            'Content-Type': 'text/xml'
        }

    })
}
//编辑菜单
export function menuEdit(query) {
    return request({
        url: 'menu/update',
        method: 'post',
        data: query,
    })
}

//父菜单
export function selectMenuFSTreeList(query) {
    return request({
        url: 'menu/selectMenuFSTreeList',
        method: 'get',
        data: query,
    })
}

//上传供应商excel
export function uploadExcel(query) {
    return request({
        url: 'supplier/uploadCust',
        method: 'post',
        data: query,
    })
}

//供应商列表
export function supplierList(query) {
    return request({
        url: 'supplier/list',
        method: 'post',
        data: query,
    })
}
//编辑供应商
export function supplierEdit(query) {
    return request({
        url: 'supplier/edit',
        method: 'post',
        data: query,
    })
}
//删除供应商
export function supplierDel(query) {
    return request({
        url: 'supplier/del',
        method: 'post',
        data: query,
    })
}

//新增供应商
export function supplierAdd(query) {
    return request({
        url: 'supplier/add',
        method: 'post',
        data: query,
    })
}

//员工列表
export function getStaffList(query) {
    return request({
        url: 'bdPsndoc/list',
        method: 'post',
        data: query,
    })
}

//审批流程列表
export function approvalList(query) {
    return request({
        url: 'wlcApprovalManager/list',
        method: 'post',
        data: query,
    })
}
//新增审批流程
export function approvalAdd(query) {
    return request({
        url: 'wlcApprovalManager/add',
        method: 'post',
        data: query,
    })
}
//编辑流程列表
export function approvalEdit(query) {
    return request({
        url: 'wlcApprovalManager/edit',
        method: 'post',
        data: query,
    })
}
//删除审批流程
export function approvalDel(query) {
    return request({
        url: 'wlcApprovalManager/del',
        method: 'post',
        data: query,
    })
}

//角色列表
export function getRoleList(query) {
    return request({
        url: 'role/list',
        method: 'post',
        data: query,
    })
}

//新增角色
export function addRole(query) {
    return request({
        url: 'role/add',
        method: 'post',
        data: query,
    })
}
//编辑角色
export function editRole(query) {
    return request({
        url: 'role/edit',
        method: 'post',
        data: query,
    })
}

//获取角色的权限路由
export function getMenuList(query) {
    return request({
        url: 'role/getOmjobsByRoleIds',
        method: 'post',
        data: query,
        traditional: true,
    })
}

//删除角色
export function delRole(query) {
    return request({
        url: 'role/remove',
        method: 'post',
        data: query,
    })
}
//角色分配菜单
export function setAuthority(query) {
    return request({
        url: 'role/setAuthority',
        method: 'post',
        data: query,
    })
}
//全部菜单
export function menuSelectMenuAllTreeList(query) {
    return request({
        url: 'menu/selectMenuAllTreeList',
        method: 'post',
        data: query,
    })
}
//查询采购经理
export function wlcPurchasingManagerList(query) {
    return request({
        url: 'wlcPurchasingManager/list',
        method: 'post',
        data: query,
    })
}
//增加采购经理
export function wlcPurchasingManagerAdd(query) {
    return request({
        url: 'wlcPurchasingManager/add',
        method: 'post',
        data: query,
    })
}
// 修改采购经理
export function wlcPurchasingManagerEdit(query) {
    return request({
        url: 'wlcPurchasingManager/edit',
        method: 'post',
        data: query,
    })
}
// 删除采购经理
export function wlcPurchasingManagerRemove(query) {
    return request({
        url: 'wlcPurchasingManager/remove',
        method: 'post',
        data: query,
    })
}
//查询是否允许修改采购订单数据
export function wlcPurchasingManagerFindIsAllowUpdate(query) {
    return request({
        url: 'wlcPurchasingManager/findIsAllowUpdate',
        method: 'post',
        data: query,
    })
}
// 修改是否允许修改采购订单数据
export function wlcPurchasingManagerIsAllowUpdate(query) {
    return request({
        url: 'wlcPurchasingManager/isAllowUpdate',
        method: 'post',
        data: query,
        headers: {
            'Content-Type': 'text/xml'
        }
    })
}








//退出接口
export function logout(query) {
    return request({
        url: 'logout',
        method: 'post',
        data: query,
    })
}











//公司列表
export function companyList(query) {
    return request({
        url: 'Company/list',
        method: 'post',
        data: query,
    })
}
//全部公司
export function allCompany() {
    return request({
        url: 'Company/getAll',
        method: 'post',
    })
}

//新增公司
export function addCompany(query) {
    return request({
        url: 'Company/add',
        method: 'post',
        data: query,
    })
}

// 编辑公司
export function editCompany(query) {
    return request({
        url: 'Company/exit',
        method: 'post',
        data: query,
    })
}

//删除公司
export function deleteCompany(query) {
    return request({
        url: 'Company/delete',
        method: 'post',
        data: query,
    })
}

//部门列表
export function departmentList(query) {
    return request({
        url: 'department/list',
        method: 'post',
        data: query,
    })
}

//新增部门
export function addDepartment(query) {
    return request({
        url: 'department/add',
        method: 'post',
        data: query,
    })
}

// 修改部门信息
export function editDepartment(query) {
    return request({
        url: 'department/exit',
        method: 'post',
        data: query,
    })
}

//删除部门
export function deleteDepartment(query) {
    return request({
        url: 'department/delete',
        method: 'post',
        data: query,
    })
}

//员工列表
export function staffList(query) {
    return request({
        url: 'staff/list',
        method: 'post',
        data: query,
    })
}

//新增员工
export function staffAdd(query) {
    return request({
        url: 'staff/add',
        method: 'post',
        data: query,
    })
}

//删除员工
export function staffDelete(query) {
    return request({
        url: 'staff/delete',
        method: 'post',
        data: query,
    })
}

//修改员工
export function staffEdit(query) {
    return request({
        url: 'staff/exit',
        method: 'post',
        data: query,
    })
}

//岗位列表
export function omJobList(query) {
    return request({
        url: 'omJob/list',
        method: 'post',
        data: query,
    })
}

//岗位配置角色
export function roleSetRoleToOmjob(query) {
    return request({
        url: 'role/setRoleToOmjob',
        method: 'post',
        data: query,
    })
}

//新增岗位
export function omJobAdd(query) {
    return request({
        url: 'omJob/add',
        method: 'post',
        data: query,
    })
}

//删除岗位
export function omJobDel(query) {
    return request({
        url: 'omJob/del',
        method: 'post',
        data: query,
    })
}

//更新岗位
export function omJobUpdate(query) {
    return request({
        url: 'omJob/update',
        method: 'post',
        data: query,
    })
}
//获取公司列表
export function omJobSelectBdCorp(query) {
    return request({
        url: 'omJob/selectBdCorp',
        method: 'post',
        data: query,
    })
}

//获取部门列表
export function omJobSelectBdDeptdoc(query) {
    return request({
        url: 'omJob/selectBdDeptdoc',
        method: 'post',
        data: query,
    })
}

//用户主列表查询
export function smUserList(query) {
    return request({
        url: 'smUser/list',
        method: 'post',
        data: query,
    })
}

//通过用户ID(cuserid)获取一个用户信息
export function smUserGetOneSmUser(query) {
    return request({
        url: 'smUser/getOneSmUser',
        method: 'post',
        data: query,
    })
}

// 给smUser分配岗位,传参为cuserid,pkOmJob
export function wlcUserJobRelationDistribution(query) {
    return request({
        url: 'wlcUserJobRelation/distribution',
        method: 'post',
        data: query,
    })
}

//查看岗位已经分配的员工
export function omJobListCuserJob(query) {
    return request({
        url: 'omJob/listCuserJob',
        method: 'post',
        data: query,
    })
}

//查询集团
export function omJobSelectGroup(query) {
    return request({
        url: 'omJob/selectGroup',
        method: 'post',
        data: query,
    })
}
//查询公司类别分类带集团的pk_corp
export function omJobSelectCorpType(query) {
    return request({
        url: 'omJob/selectCorpType',
        method: 'post',
        data: query,
    })
}





